Soil / Bare Land Index · SWIR–NIR Ratio

NDSI_soil – Normalized Difference Soil Index

NDSI_soil highlights bare land by contrasting SWIR and NIR reflectance. Useful for soil exposure mapping, desert studies and land degradation analysis.

1. Scientific Definition

The NDSI_soil enhances dry bare soil by using the strong SWIR response of exposed soil compared to vegetation-sensitive NIR reflectance.

Formula

NDSI_soil = (SWIR − NIR) / (SWIR + NIR)

  • SWIR – Shortwave Infrared reflectance
  • NIR – Near Infrared reflectance

Interpretation

  • > 0 → dry soil / sand / bare land
  • < 0 → vegetation / moist soil / non-bare areas

Applications

  • Soil / bare land detection
  • Desertification studies
  • Urban fringe and agricultural soil exposure
  • Construction site monitoring

2. Required Bands

Sentinel-2

  • NIR → B8
  • SWIR → B11

Landsat 8/9

  • NIR → B5
  • SWIR1 → B6

Suggested Palette

[ "#0b1220", "#2c3e50", "#8e8d89", "#c8bfb5", "#f3e9da" ]

3. Google Earth Engine Code – NDSI_soil


// NDSI_soil = (SWIR - NIR) / (SWIR + NIR)

var roi = geometry;
Map.centerObject(roi, 11);

// Load Sentinel-2 SR
var s2 = ee.ImageCollection("COPERNICUS/S2_SR")
  .filterBounds(roi)
  .filterDate("2023-01-01", "2023-12-31")
  .filter(ee.Filter.lt("CLOUDY_PIXEL_PERCENTAGE", 20))
  .select(["B8","B11"]); // NIR, SWIR

var img = s2.median().clip(roi);

// Compute NDSI_soil
var ndsi_soil = img.expression(
  "(S - N) / (S + N)",
  {
    "S": img.select("B11"),  // SWIR
    "N": img.select("B8")    // NIR
  }
).rename("NDSI_soil");

// Visualization
var vis = {
  min: -1,
  max: 1,
  palette: ["#0b1220","#2c3e50","#8e8d89","#c8bfb5","#f3e9da"]
};

Map.addLayer(ndsi_soil, vis, "NDSI_soil");

// Export
Export.image.toDrive({
  image: ndsi_soil,
  description: "NDSI_soil_export",
  fileNamePrefix: "NDSI_soil",
  region: roi,
  scale: 20,
  crs: "EPSG:4326",
  maxPixels: 1e13
});